import os
import tornado.ioloop
import tornado.httpserver
import tornado.web
import tornado.autoreload

from urls import handlers
from application import SETTINGS


class Application(tornado.web.Application):
    def __init__(self):
        tornado.web.Application.__init__(self, handlers, **SETTINGS)


def main():
    http_server = tornado.httpserver.HTTPServer(Application())
    http_server.listen(8888)
    tornado.ioloop.IOLoop.current().start()

if __name__ == "__main__":
    main()
